Flow control is a technique for preventing packet losses in a switched environment due to network bottlenecks or congestion. Ideally, a high performance switch should be capable of forwarding frames at full wire speed to and from each of its ports simultaneously with almost no latency and no packet loss. However, in practice, situations may arise when packet data is transmitted faster than it can be handled by the switch.
Switches may include buffers at each port (e.g., first-in-first-out (FIFO) registers) to alleviate some inconsistencies between port-to-port transmit and receive rates with link partners. However, if the buffer at the destination port of an incoming packet is full, a conventional switch may be forced to drop the packet.
The IEEE 802.3x standard specifies a flow control mechanism for Ethernet LAN (Local Area Network) switches. The IEEE 802.3x flow control mechanism is implemented within the MAC (Media Access Control) sublayer. A port's input buffer begins, to fill as packets are received. Once the buffer has reached a pre-programmed threshold, the MAC control sublayer signals an internal state machine to transmit a “PAUSE” frame. The PAUSE frame informs the link partner to halt transmission for a specified length of time, e.g., a programmed idle time. The MAC control module continues to transmit PAUSE frames with the programmed idle time as long as the threshold has been exceeded. If the buffer level falls below the threshold prior to the expiration of this time, another PAUSE frame is sent with a zero time specified to re-enable transmission.